package com.googlecode.sparda.commons.constant;

/**
 * Memory Constant to simplify calculus in byte.
 * All constants are represented in bytes with the lowest possible primitive type.
 * @author Fabio Grucci (<i>alias</i> <b>Phoenix</b>)
 * @version 1.0
 * @since 1.0
 */
public interface MemoryConstant {
	/**
	 * Number of byte in eight bit.
	 */
	public static final byte EIGHT_BIT 		= 1;					//			  		8 bit = 1 byte
	/**
	 * Number of byte in one kilobit.
	 */
	public static final byte ONE_KILOBIT 	= 1000/8;				// 				1.000 bit / 8 bit = 			  125 byte
	/**
	 * Number of byte in one megabit.
	 */
	public static final int ONE_MEGABIT 	= ONE_KILOBIT * 1000;	// 			1.000.000 bit / 8 bit = 		   125000 byte  
	/**
	 * Number of byte in one gigabit.
	 */
	public static final int ONE_GIGABIT 	= ONE_MEGABIT * 1000;	// 		1.000.000.000 bit / 8 bit = 		125000000 byte 
	/**
	 * Number of byte in one terabit.
	 */
	public static final long ONE_TERABIT 	= ONE_GIGABIT * 1000L;	// 	1.000.000.000.000 bit / 8 bit = 	125000000000L byte 
	/**
	 * Number of byte in one byte.
	 */
	public static final byte ONE_BYTE 		= 1;					//			 8 bit = 1 byte
	/**
	 * Number of byte in one kilobyte.
	 */
	public static final short ONE_KILOBYTE 	= ONE_BYTE * 1024;		//		   8192 bit 			 1024 byte
	/**
	 * Number of byte in one megabyte.
	 */
	public static final int ONE_MEGABYTE 	= ONE_KILOBYTE * 1024;	//		8388608 bit			  1048576 byte
	/**
	 * Number of byte in one gigabyte.
	 */
	public static final int ONE_GIGABYTE 	= ONE_MEGABYTE * 1024;	//	 8589934592 bit		   1073741824 byte
	/**
	 * Number of byte in terabyte.
	 */
	public static final long ONE_TERABYTE 	= ONE_GIGABYTE * 1024L;	//8796093022208 bit		1099511627776 byte
}
